from flask import Flask
from flask_cors import CORS

from common import exception_handler
from blue_print.route import bp

app = Flask(__name__)
CORS(app)  # 启用CORS

app.register_error_handler(Exception, exception_handler.handle_exception)
app.register_blueprint(bp)

if __name__ == '__main__':
    app.run(debug=False, host='0.0.0.0', port=9000, threaded=True)